﻿using System.Collections.Generic;
using Model = DTcms.Model;
using BLL = DTcms.BLL;
using System.Collections;
using System.Text.RegularExpressions;
using DTcms.Common;
using DTcms.Web.Mvc.UI;

namespace System.Web.Mvc
{
    public static class UrlHelperExtend
    {
        public static BaseController _base = new BaseController();

        /// <summary>
        /// 返回URL重写统一链接地址
        /// </summary>
        public static string linkurl(string _key, params object[] _params)
        {
            return _base.linkurl(_key, _params);
        }

        /// <summary>
        /// 根据站点目录和已生成的链接重新组合(实际访问页面用到)
        /// </summary>
        /// <param name="sitepath">站点目录</param>
        /// <param name="urlpath">URL链接</param>
        /// <returns>String</returns>
        public static string getlink(string sitepath, string urlpath)
        {
            return _base.getlink(sitepath, urlpath);
        }

        /// <summary>
        /// 返回URL重写统一链接地址
        /// </summary>
        public static string queryurl(string _key, string call_index, object id)
        {
            return _base.queryurl(_key, call_index, id);
        }

        /// <summary>
        /// 查找匹配的URL
        /// </summary>
        /// <param name="channel_id">频道ID</param>
        /// <param name="call_index">调用名</param>
        /// <param name="id">ID</param>
        /// <returns></returns>
        public static string get_url_rewrite(string channel_name, string type, string call_index, int id)
        {
            return _base.get_url_rewrite(channel_name, type, call_index, id);
        }

        /// <summary>
        /// 查找匹配的URL
        /// </summary>
        /// <param name="channel_id">频道ID</param>
        /// <param name="call_index">调用名</param>
        /// <param name="id">ID</param>
        /// <returns></returns>
        public static string get_url_rewrite(int channel_id, string call_index, int id)
        {
            return _base.get_url_rewrite(channel_id, call_index, id);
        }
    }
}
